home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
database
/
bdem22.zip
/
DEMO.CMP
< prev
next >
Wrap
Text File
|
1994-10-27
|
4KB
|
111 lines
This file contains a list of ALL the program lines that were changed to
create the completed Demo program from the Builder generated output.
With the exception of the having to set up the Rel_Maint() function, all
the changes could be done in a matter of 1 or 2 minutes.
The listing below contains all the lines of code that have been added,
changed or deleted. You may look in the DEMO.PR1 and DEMO.PRG files to
confirm this. For REAL doubting Thomas's, download a copy of Builder,
generate the code and then make the changes yourself.
Each line item contains a line number followed by a single character code
to indicate what was done to that particular line of code. "A" for add,
"C" for change, "D" for delete, and "M" for move. After that is a greater
than symbol and then the source code line referenced.
Statistics:
Of the 4844 lines of code generated by Builder for the Demo program...
2 line of code was changed
3 lines of code were added
18 lines of code were deleted
--
23 Total lines of code affected
23/4718 = .00487 = 0.49% of the program lines in the final product are
different from the source originally generated! 1/2 of one percent!
That means 99.51% of the source was created by Builder!
Looking at this from another perspective, specifically how much actual
keying is involved. I added up the number of typed characters it took
to create DEMO.PRG from DEMO.PR1. I did not include preceding spaces or
the suffixing carriage return. I did include embedded spaces. I ended
up with 112 typed characters. (This paragraph is 353 characters long!)
DEMO.PR1 is 160,064 bytes in size.
so...112/176,536 = .000634 times 100 (%) = .0634 or .06% meaning:
99.51% of program LINES remained unchanged (from above).
and
99.94% of the CODE remained unchanged!
You can draw your own conclusions.
CHANGES MADE TO THE PROGRAM:
Deleted and added to convert a "Normal" dialog to one that would save
any changes to some fields of the current OPTIONS.DBF record.
<---------------- demo.pr1 ---------------->
3891D> ReadGets(@GetList)
3892D>
3893D> IF LASTKEY() == K_ESC
3894D> EXIT
3895D> ENDIF
3896D>
3897D> ** Add a command here to execute something after this **
3898D> ** dialog box. **
<---------------- demo.prg ---------------->
3891A> GetEdit("OPTIONS",WinBott()-1,WinLeft()+2,GetList)
3892A> EXIT
Changing the Builder gen'd TBrowse code to traverse multiple TBrowse
objects is very simple. Change the first parm to the BrowseDb() function
so that more than one object is passed.
<---------------- demo.pr1 ---------------->
4159C> aBrwObj := { oBrwObj }
4168D> Brws152()
In PROCEDURE Brws152 delete these so that the procedure will not execute
the browse object, but instead will return the object to the calling
routine.
4300D> DO WHILE .T.
4301D> SetMsgLin("▓ Arrows/PgUp/PgDn-Move ▓ ENTER-Edit ▓ Alt+M-Menu ▓ Ctrl+ENTER-Next ▓ ESC-Exit ▓")
4302D> IF !BrowseDb(aBrwObj)
4303D> EXIT
4304D> ENDIF
4305D>
4306D> // You May Want to Execute Something Here to Follow the Browse
4307D> ENDDO
4308D> WINDOW REMOVE // Remove Window from Screen
<---------------- demo.prg ---------------->
In PROCEDURE Brws146 do this...
4153C> aBrwObj := { oBrwObj, Brws152() }
4166A> WINDOW REMOVE
For multiple browses to work, a database RELATION must be established before
the browse is begun. Be sure to see the hand code section (Hand149) that
calls this browse to see how this can be done.
Changed to pass menu control parms to Gen_Maint(). If you do obtain a copy
of Builder v2.2 be sure to look at how the mOpts parameter was passed using
the mechanisms built into Hand Code Sections. Specifically the @FUNC and
@NXTWNDW Hand Code commands.
<---------------- demo.pr1 ---------------->
4579C> Gen_Maint(Fmr1,Fmc1,Fmr2,Fmc2,"058",aCities,4,.F.,"ACDF")
<---------------- demo.prg ---------------->
4564C> Gen_Maint(Fmr1,Fmc1,Fmr2,Fmc2,"058",aCities,4,.F.,mOpts)